package com.wxzz.elearing.evaluation.service.openfeign;

import com.wxzz.elearing.evaluation.service.openfeign.sentinel.EnterpriseApiFeignImpl;
import com.wxzz.elearning.common.dto.FeignEnterpriseDto;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "1122-wxzzlearn-user-model",fallback = EnterpriseApiFeignImpl.class)
public interface IEnterpriseApiFeign {

    /**
     * 根据企业id查询企业详情
     *
     * @param enterpriseId
     * @return
     */
    @RequestMapping(value = "/enterprise-api/selectEnterpriseById", method = RequestMethod.POST)
    ReturnVO<String> selectEnterpriseById(@RequestParam("enterpriseId") Long enterpriseId);

    /**
     * 根据企业id查询企业详情
     *
     * @param enterpriseId
     * @return
     */
    @RequestMapping(value = "/enterprise-api/selectEnterpriseDtoById/{enterpriseId}", method = RequestMethod.POST)
    FeignEnterpriseDto selectEnterpriseDtoById(@PathVariable Long enterpriseId);

    /**
     * 修改企业的星级
     *
     * @param enterpriseId
     * @param star
     */
    @RequestMapping(value = "/enterprise-api/updateEnterpriseStart/{enterpriseId}/{star}", method = RequestMethod.POST)
    void updateEnterpriseStart(@PathVariable Long enterpriseId, @PathVariable Integer star);
}
